// registry.h

#ifndef __REGISTRY_H__
#define __REGISTRY_H__

#define WM_RELOADSETTINGS		(WM_APP + 1409)

#define RS_RUN_KEY				L"Software\\Microsoft\\Windows\\CurrentVersion\\Run"
#define RS_TASKSWITCHXP_KEY		L"Software\\Alexander Avdonin\\TaskSwitchXP\\2.0"
#define RS_EXCLUSIONS_SUBKEY	L"Exclusions"

#define RS_ALLUSERS				L"AllUsers"
#define RS_LANGFILE				L"LangFile"
#define RS_TASKSWITCHXP			L"TaskSwitchXP"
#define RS_FLAGS				L"Flags"
#define RS_CAPFONTNAME			L"CapFontName"
#define RS_CAPFONTATTR			L"CapFontAttr"
#define RS_CAPTEXTCOLOR			L"CapTextColor"
#define RS_CAPSHADOW			L"CapShadow"
#define RS_PVDELAY				L"PreviewDelay"
#define RS_PVWIDTH				L"PreviewWidth"
#define RS_LISTWIDTH			L"ListWidth"
#define RS_LISTHEIGHT			L"ListHeight"
//#define RS_ICONSX				L"IconsX"
//#define RS_ICONSY				L"IconsY"
#define RS_FLAGSEX				L"FlagsEx"
#define RS_FLAGSPV				L"FlagsPv"
#define RS_FLAGSLIST			L"FlagsList"
#define RS_FLAGSPANE			L"FlagsPane"
#define RS_CUSTOMICON			L"CustomIcon"
#define RS_TEXTCOLOR			L"TextColor"
#define RS_SELTEXTCOLOR			L"SelTextColor"
#define RS_SELCOLOR				L"SelColor"
#define RS_MARKTEXTCOLOR		L"MarkTextColor"
#define RS_MARKCOLOR			L"MarkColor"
#define RS_SELMARKTEXTCOLOR		L"SelMarkTextColor"
#define RS_SELMARKCOLOR			L"SelMarkColor"
#define RS_PANEFONTNAME			L"PaneFontName"
#define RS_PANEFONTATTR			L"PaneFontAttr"
#define RS_PANETEXTCOLOR		L"PaneTextColor"
#define RS_PANESHADOW			L"PaneShadow"

#define RS_LISTFONTNAME			L"ListFontName"
#define RS_LISTFONTATTR			L"ListFontAttr"
//#define RS_LISTTEXTCOLOR		L"ListTextColor"
#define RS_LISTSHADOW			L"ListShadow"

#define RS_THEMEFILE			L"ThemeFile"
#define	RS_COLORTHEME			L"ColorTheme"
#define RS_DEFCOLORS			L"DefaultColors"
#define RS_WB5SKIN				L"WB5_Skin"

#define RS_EXITHK				L"ExitHotKey"
#define RS_SHOWHIDEHK			L"TrayHotKey"
#define RS_CONFIGHK				L"ConfigHotKey"
#define RS_APPLISTHK			L"AppListHotKey"
#define RS_INSTLISTHK			L"InstListHotKey"
#define RS_MINIMIZETRAYHK		L"MinimizeHotKey"
#define RS_RESTORETRAYHK		L"RestoreHotKey"
//klvov: hotkey to display alternate task switching window, Win+K, 0x84b by default
#define RS_ALTAPPLISTHK			L"AlternateAppListHotKey"
//~klvov
#define RS_CONFIGFLAGS			L"ConfigFlags"
#define RS_CONFIGPOS			L"ConfigPos"
#define RS_CONFIGPAGE			L"ConfigPage"
#define RS_SHOWDELAY			L"ShowDelay"
#define RS_FADEIN				L"FadeIn"
#define RS_FADEOUT				L"FadeOut"

#define RS_TRAYMENU				L"TrayMenu"
#define RS_TRAYCONFIG			L"TrayConfig"
#define RS_TRAYAPPLIST			L"TrayAppList"
#define RS_TRAYINSTLIST			L"TrayInstList"

#define RS_EXCLCOUNT			L"Count"

// Flags
#define TSF_LAYEREDMASK			0x000000ff
#define TSF_LAYERED				0x00000100
#define TSF_DROPSHADOW			0x00000200
#define TSF_POSTOP				0x00000400
#define TSF_POSBOTTOM			0x00000800
#define TSF_POSLEFT				0x00001000
#define TSF_POSRIGHT			0x00002000
#define TSF_ACTIVEMONITOR		0x00004000
#define TSF_NOREPLACEALTTAB		0x00010000
#define TSF_INSTSWITCHER		0x00020000
#define TSF_HOOKALTTAB			0x00040000
#define TSF_STICKYALTTAB		0x00080000
#define TSF_ABOVEPRIORITY		0x00100000
#define TSF_HIGHPRIORITY		0x00200000
#define TSF_NOAUTOSTART			0x00400000
#define TSF_SHOWTRAYICON		0x01000000
#define TSF_USECUSTOMICON		0x02000000
#define TSF_CHECKMSTS			0x04000000
#define TSF_EXTMOUSE			0x08000000
#define TSF_RELOADICONS			0x10000000
#define TSF_ENUMTRAY			0x20000000
#define TSF_WHEELTAB			0x40000000
#define TSF_NOCONFIRMEXIT		0x80000000

// CapFontAttr
#define TSFCF_SIZEMASK			0x000000ff
#define TSFCF_BOLD				0x00000100
#define TSFCF_ITALIC			0x00000200
// CapShadow
#define TSFCS_COLORMASK			0x00ffffff
#define TSFCS_DEEPMASK			0x3f000000
#define TSFCS_NODEEP			0x40000000
#define TSFCS_NEGATIVEDEEP		0x80000000
// FlagsEx
#define TSEX_DEFAULTMODE		0
#define TSEX_VISUALMODE0		0
#define TSEX_VISUALMODE1		1
#define TSEX_VISUALMODE2		2
#define TSEX_VISUALMODE3		3
#define TSEX_VISUALMODE4		4
#define TSEX_VISUALMODE5		5
#define TSEX_CLASSICMODE0		0
#define TSEX_CLASSICMODE1		1
#define TSEX_POWERTOYMODE		TSEX_VISUALMODE1
#define TSEX_SMWINDOWMODE		TSEX_VISUALMODE2
#define TSEX_FLATXPMODE			TSEX_VISUALMODE3
#define TSEX_SOFTXPMODE			TSEX_VISUALMODE4
#define TSEX_TASKBARMODE		TSEX_VISUALMODE5
#define TSEX_FLATMODE			TSEX_CLASSICMODE1

#define TSFEX_NOVISUALSTYLES	0x00010000
#define TSFEX_LEFTRIGHT			0x00020000
#define TSFEX_REMOVECAPTION		0x00040000
#define TSFEX_REMOVEPANE		0x00080000
#define TSFEX_CAPSMALLICON		0x00100000
#define TSFEX_CAPNOICON			0x00200000
#define TSFEX_DEFCAPCOLORS		0x01000000
#define TSFEX_DEFPANECOLORS		0x02000000
#define TSFEX_DEFLISTCOLORS		0x04000000
#define TSEX_DEFCOLORSMASK		0x07000000
#define TSFEX_OWNERCAPTION		0x10000000

// FlagsPv
#define TSPV_UPDATEMASK			0x0000ffff
#define TSFPV_LIVEUPDATE		0x00010000
#define TSFPV_NOCACHE			0x00020000
#define TSFPV_DESKTOP			0x00100000
#define TSFPV_TASKBAR			0x00200000
#define TSFPV_WALLPAPER			0x00400000
#define TSFPV_DRAWBORDER		0x00800000
#define TSFPV_POPUPONLY			0x01000000
#define TSFPV_NOREGION			0x02000000
#define TSFPV_VCENTER			0x04000000
#define TSFPV_SHOWMINIMIZED		0x08000000
#define TSFPV_OLDSTYLE			0x10000000
#define TSFPV_EXCLUDELAYERED	0x80000000

// FlagsList
#define TSL_SELSTYLEMASK		0x0000000f//1111
#define TSFL_SMALLICONS			0x00000010//10000
#define TSFL_VERTICALLIST		0x00000020//100000
#define TSFL_SHOWTOOLTIPS		0x00000040//1000000
#define TSFL_DRAWFOCUSRECT		0x00000080//10000000
#define TSFL_HOTTRACK			0x00000100//100000000
#define TSFL_MOUSEOVER			0x00000200//1000000000
#define TSFL_INVERSEWHEEL		0x00000400//10000000000
#define TSFL_ENABLEQ			0x00001000//1000000000000
#define TSFL_ALTMODE			0x00002000//10000000000000
#define TSFL_TEMPSTICKY			0x10000000//10000000000000000000000000000
#define TSFL_SORTEDTITLES		0x20000000//100000000000000000000000000000
#define TSFL_SORTEDEXEPATHS		0x40000000//1000000000000000000000000000000
#define TSFL_MENUACTIVE			0x80000000//10000000000000000000000000000000

#define TSL_SELSTYLE0			0
#define TSL_SELSTYLE1			1
#define TSL_SELSTYLE2			2

#define TSL_SELFRAMESTYLE		TSL_SELSTYLE0
#define TSL_SELSOLIDSTYLE		TSL_SELSTYLE1
#define TSL_SELROUNDSTYLE		TSL_SELSTYLE2

// FlagsPane
#define TSP_HEIGHTMASK			0xffff0000
#define TSP_FORMATMASK			0x000000ff
#define TSP_FORMATNONE			0
#define TSP_FORMATPID			1
#define TSP_FORMATNAME			2
#define TSP_FORMATNAMEPID		3
#define TSP_FORMATDESCR			4
#define TSFP_TASKNUMBER			0x00000100

#define TSEXCLF_DISABLED		0x00000001
#define TSEXCLF_PREVIEW			0x00000002
#define TSEXCLF_ENUM			0x00000004

#define TSEXCLF_BYPROCESS		0x00000010
#define TSEXCLF_BYCLASS			0x00000020
#define TSEXCLF_BYCAPTION		0x00000040

#define TSEXCLF_BYMASK			(TSEXCLF_BYPROCESS | TSEXCLF_BYCLASS | TSEXCLF_BYCAPTION)
#define TSEXCLF_MASK			(TSEXCLF_BYMASK | TSEXCLF_PREVIEW | TSEXCLF_ENUM)

#define TSEXCLF_NEW				0x80000000

// config flags
#define CFGF_TOPMOST			0x00000001
#define CFGF_TASKBAR			0x00000002
#define CFGF_POSITION			0x00000004
#define CFGF_LASTPAGE			0x00000008
#define CFGF_TASKSWITCHXP		0x00000010

// blending
#define TSBL_SPEEDMASK			0x0000ffff
#define	TSBL_LAYEREDMASK		0xff000000
#define TSFBL_ENABLED			0x00010000
#define TSFBL_STARTED			0x00020000

// command line flags
#define CCLF_INSTALL			0x00000100
#define CCLF_DEFAULTS			0x00000200
#define CCLF_NEWEXCL			0x00000400
#define CCLF_MODALACTIVE		0x80000000
#define CCLF_PAGEMASK			0x000000ff

#define CCLF_NOCHECKVER			0x00010000
#define CCLF_STNEXTTASK			0x00020000
#define CCLF_STINEXTTASK		0x00040000
#define CCLF_ESCAPE				0x00080000

#define WM_REMOTECMD			(WM_APP + 1410)

#define DEFAULT_TRAYMSG			0
#define DEFAULT_FLAGS			(TSF_HIGHPRIORITY | TSF_CHECKMSTS | TSF_DROPSHADOW | TSF_LAYEREDMASK | \
								TSF_POSTOP | TSF_SHOWTRAYICON | TSF_INSTSWITCHER)
#define DEFAULT_CAPFONTNAME		L"Trebuchet MS"
#define DEFAULT_CAPFONTATTR		0x0000010a
#define DEFAULT_CAPTEXTCOLOR	RGB(255,255,255)
#define DEFAULT_CAPSHADOW		0x02000000
#define DEFAULT_PVDELAY			50 // 0xffffffff
#define DEFAULT_PVWIDTH			330
#define DEFAULT_LISTWIDTH		230
#define DEFAULT_LISTHEIGHT		264

#define DEFAULT_PANEFONTNAME	L"Tahoma"
#define DEFAULT_PANEFONTATTR	0x00000108
#define DEFAULT_PANETEXTCOLOR	RGB(255,255,255)
#define DEFAULT_PANESHADOW		0x02000000

#define DEFAULT_PANEHEIGHT		36
#define DEFAULT_PANEFORMAT		TSP_FORMATDESCR
#define DEFAULT_FLAGSPANE		MAKELONG(DEFAULT_PANEFORMAT | TSFP_TASKNUMBER, DEFAULT_PANEHEIGHT)

#define DEFAULT_LISTFONTNAME	L"Tahoma"
#define DEFAULT_LISTFONTATTR	0x00000108
//#define DEFAULT_LISTTEXTCOLOR	RGB(0,0,0)
//#define DEFAULT_LISTSHADOW		0x00000000

#define DEFAULT_ICONSX			5
#define DEFAULT_ICONSY			6
#define DEFAULT_SELSTYLE		TSL_SELSTYLE1
//#define DEFAULT_LISTSIZES		MAKELONG(DEFAULT_LISTWIDTH, DEFAULT_LISTHEIGHT)
#define DEFAULT_FLAGSEX			(TSFEX_OWNERCAPTION)
#define DEFAULT_PVUPDATE		500
#define DEFAULT_FLAGSPV			(DEFAULT_PVUPDATE | TSFPV_DESKTOP | TSFPV_WALLPAPER | TSFPV_TASKBAR | \
								TSFPV_DRAWBORDER | TSFPV_VCENTER)
#define DEFAULT_FLAGSLIST		(DEFAULT_SELSTYLE | TSFL_SMALLICONS | TSFL_VERTICALLIST | \
								TSFL_SHOWTOOLTIPS | TSFL_HOTTRACK | TSFL_MOUSEOVER | TSFL_DRAWFOCUSRECT)
#define DEFAULT_SHOWTRAYICON	0
#define DEFAULT_CUSTOMICON		L""

#define DEFAULT_TEXTCOLOR		RGB(0,0,0)
#define DEFAULT_SELTEXTCOLOR	RGB(255,255,255)
#define DEFAULT_SELCOLOR		0xc56a31
#define DEFAULT_MARKTEXTCOLOR	RGB(255,255,255)
#define DEFAULT_MARKCOLOR		0xc56a31
#define DEFAULT_SELMARKTEXTCOLOR	RGB(255,255,255)
#define DEFAULT_SELMARKCOLOR		0x800000

#define DEFAULT_COLORTHEME		TSFDC_DEFAULTMASK

#define DEFAULT_APPLISTHK		0x0000087b
#define DEFAULT_INSTLISTHK		0x0000087a
#define DEFAULT_CONFIGHK		0x00000b43
#define DEFAULT_SHOWHIDEHK		0x00000b48
#define DEFAULT_EXITHK			0x00000b58
#define DEFAULT_MINIMIZETRAYHK	0x00000000
#define DEFAULT_RESTORETRAYHK	0x00000000

#define DEFAULT_TRAYMENU		WM_RBUTTONUP
#define DEFAULT_TRAYCONFIG		WM_MBUTTONUP
#define DEFAULT_TRAYNEXT		WM_LBUTTONUP
#define DEFAULT_TRAYPREV		0

#define DEFAULT_CONFIGPOS		(-1)
#define DEFAULT_CONFIGPAGE		0

#define DEFAULT_CONFIGFLAGS		(CFGF_TASKBAR | CFGF_POSITION | CFGF_LASTPAGE | CFGF_TASKSWITCHXP)

#define DEFAULT_FADEINSPEED		(250)
#define DEFAULT_FADEOUTSPEED	(250)
#define DEFAULT_FADEIN			(DEFAULT_FADEINSPEED)
#define DEFAULT_FADEOUT			(DEFAULT_FADEOUTSPEED)
#define DEFAULT_SHOWDELAY		0


#define MAX_DATALEN				1024
#define MIN_PVDELAY				10
#define MAX_PVDELAY				10000
#define MIN_PVWIDTH				10
#define MAX_PVWIDTH				1000
#define MIN_LISTWIDTH			32
#define MAX_LISTWIDTH			1000
#define MIN_LISTHEIGHT			74
#define MAX_LISTHEIGHT			1000
#define MIN_PVUPDATE			100
#define MAX_PVUPDATE			10000
#define MIN_PANEHEIGHT			10
#define MAX_PANEHEIGHT			100
#define MIN_ICONSX				1
#define MIN_ICONSY				3
#define MAX_ICONSX				100
#define MAX_ICONSY				100
#define MAX_VISUALMODES			6
#define MAX_CLASSICMODES		2
#define MAX_EXCLUSIONS			256
#define MIN_FADEINSPEED			50
#define MAX_FADEINSPEED			2000
#define MIN_FADEOUTSPEED		50
#define MAX_FADEOUTSPEED		2000
#define MIN_SHOWDELAY			0
#define MAX_SHOWDELAY			1000
#define MAX_SELSTYLES			3

#define MAX_FILENAME			256
#define MAX_FILEPATH			1024
#define MAX_CAPTION				128
#define MAX_CLASSNAME			128
#define MAX_TASKINFO			128
#define MAX_EXCLNAME			128

#endif // __REGISTRY_H__
